<?php
	session_name("sesiondirh");
	session_start();
	include("db_conn.php");
?> 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="js/jquery-1.3.2.min.js" type="text/javascript"></script> 
<script src="js/jquery.easing.1.3.js" type="text/javascript"></script> 
<script src="js/jquery.slideviewer.1.1.js" type="text/javascript"></script>

<script type="text/javascript"> 
$(window).bind("load", function() { 
    $("div#mygalone").slideView();
	$("div#mygaltop").slideView({toolTip: true}); 
}
); 
</script>
<style type="text/css">
* {margin: 0; padding: 0;}
p a {color: #ff0000;}
a:focus {outline:none;}
h3, h2 {padding: 1em 0 0.8em 0; border-bottom: 1px solid silver; margin: 0 0 1em 0;}
h4 {font: normal 1.3em Arial; padding: 1.2em 0 0 0; border-top: 1px solid #ff0000; margin: 2em 0 1em 0;}
h5 {font: bold 1 Verdana; padding: 1.2em 0 0 0; margin-top: 2em; color: #ff0000;}
body {
font-family: Verdana, sans-serif;
text-align: center;
margin: 0 0 6em 0;
padding: 0;
background: #fff url(../images/page-bg.jpg) center 20px no-repeat;
color: black;
font-size: 62.5%; 						
}
#wrapp {
width: 710px;
text-align: left;
font-size: 1.1em;
margin: 1em auto;
padding: 1em;
color: black;
}

/* slideViewer 1.0 default styles */
.svw {width: 50px; height: 20px; background: #fff;}
.svw ul{position: relative; left: -999em;}

.stripViewer { /* this is the DIV container for your UL of images */
position: relative;
overflow: hidden; 
border: 5px solid #ff0000; /* this is the border. should have the same value for the links */
margin: 0 0 1px 0;
}
.stripViewer ul { /* this is your UL of images */
position: relative;
left: 0;
top: 0;
width: 1%;
list-style-type: none;
}
.stripViewer ul li { /* each image is arranged horizontally */
float:left;
}
.stripTransmitter { /* this is the DIV for your transmitter (the UL generated at run time that commands the list)*/
overflow: auto;
width: 1%;
}
.stripTransmitter ul { /* the auto-generated set of links */
position: relative;
list-style-type: none;
}
.stripTransmitter ul li{ /* in this list too, each LI is arranged horizontally */
width: 20px;
float:left;
margin: 0 1px 1px 0;
}
.stripTransmitter a{ /* the links. */
font: bold 10px Verdana, Arial;
text-align: center;
line-height: 22px;
background: #ff0000;
color: #fff;
text-decoration: none;
display: block;
}
.stripTransmitter a:hover { /* hover */
background: #c50000;
color: #fff;
}
.stripTransmitter a.current, .stripTransmitter a.current:hover { /* current */
background: #fff;
color: #ff0000;
}
/* end slideViewer default styles */

</style>


 
</head>

<body>
<?php
if(isset($_GET['folio']) && isset($_GET['rut'])){ 
	$db_conn = conecta();
	$folio = $_GET['folio'];
	$rut = $_GET['rut'];
	$consulta = "select Img1, Img2, Img3, Img4 from Historial where Folio = '$folio' and RutCliente = '$rut'";
	$result = mysql_query($consulta,$db_conn);
	$img = mysql_fetch_array($result);
	if(!empty($img)){?>	
    <div id="mygaltop" class="stripViewer"> 
        <ul>
        <?php
			if(!empty($img['Img1']))
            	echo '<li><img width="640" height="480" src="files/images/'.$img['Img1'].'" /></li>';
			if(!empty($img['Img2']))
            	echo '<li><img width="640" height="480" src="files/images/'.$img['Img2'].'" /></li>';
			if(!empty($img['Img3']))
            	echo '<li><img width="640" height="480" src="files/images/'.$img['Img3'].'" /></li>';
			if(!empty($img['Img4']))
            	echo '<li><img width="640" height="480" src="files/images/'.$img['Img4'].'" /></li>';
		?>
        </ul> 
    </div>
    
<?php
	}
	close($db_conn,$result);
}
?>
<input type="button" value="Cerrar" onclick="window.close()" />   
</body>
</html>
